<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>work.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     <script type="text/javascript" src="jquery-3.1.0.js"></script>
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript">
		//selected选中某些单选框或多选框
		function pu(){
			$("option[name='d']").eq(2).attr("selected","selected");
		} 
		function puo(){
			$("input[name='r']").eq(1).attr("checked","checked");
		} 
		function pul(){
			$("option[name='t']").eq(1).attr("selected","selected");
			$("option[name='t']").eq(4).attr("selected","selected");
		} 
		function pull(){
			$("input[name='p']").eq(1).attr("checked","checked");
			$("input[name='p']").eq(3).attr("checked","checked");
		} 
		function syso(){
		
		}
		
	</script>
  </head>
  
  <body>
 	 <button onclick="pu()">使单选框的3号被选中</button>  <button onclick="pul()">使下拉框的5号和2号被选中</button></br>
  	<button onclick="pull()">使多选框的2号和4号被选中</button> <button onclick="puo()">使单选框的2号被选中</button></br>
  	 <button onclick="syso()">打印已经被选中的值</button></br>
  	 <select>
   		<option name="d">单选框一</option>
   		<option name="d">单选框二</option>
   		<option name="d">单选框三</option>
  	 </select>
   
	  <select multiple="multiple">
	   	<option name="t">多选框一</option>
   		<option name="t">多选框二</option>
  	 	<option name="t">多选框三</option>
   		<option name="t">多选框四</option>
   		<option name="t">多选框五</option>
  		 </select>
 	  </br>
     <input type="checkbox" name="p">多选1<input type="checkbox" name="p">多选2<input type="checkbox" name="p">多选3
     <input type="checkbox" name="p">多选4
     <br/>
      <input type="radio" name="r">单选1<input type="radio" name="r">单选2<input type="radio" name="r">单选3
   
    </body>
</html>
